package com.easylinkin.linkappapi.roster.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.easylinkin.linkappapi.common.typehandler.StringToListHandler;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.apache.ibatis.type.TypeHandler;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("labor_team")
public class LaborTeam implements Serializable {
    private static final long serialVersionUID = 1L;

    @TableId(value = "id_", type = IdType.AUTO)
    private Long id;

    @TableField("labor_team_name_")
    private String laborTeamName;

    @TableField("credit_code_")
    private String creditCode;

    @TableField("leader_name_")
    private String leaderName;

    @TableField("leader_phone_")
    private String leaderPhone;

    @TableField("remark_")
    private String remark;

    @TableField(value = "contract_files_", typeHandler = StringToListHandler.class)
    private List<String> contractFiles;

    @TableField("tenant_id_")
    private String tenantId;

    /**
     * 创建人id
     */
    @TableField("creator_id_")
    private Long creatorId;

    /**
     * 创建日期
     */
    @TableField("create_time_")
    private Date createTime;

    /**
     * 修改人id
     */
    @TableField("modify_id_")
    private Long modifyId;

    /**
     * 修改时间
     */
    @TableField("modify_time_")
    private Date modifyTime;

    /**
     * 人数（非数据库字段）
     */
    @TableField(exist = false)
    private Integer personCount;
} 